<?php


    include('./_con.php');

    $username = $_REQUEST['phone'];
    $password = $_REQUEST['password'];

    $sql = "select * from res where phone='$username' and pass_word='$password'";

    $res = $mysqli->query($sql);

    if($res->num_rows > 0){
        echo '{"hash":true,"msg":"用户名已存在"}';  
    }else{
        echo '{"hash":false,"msg":"用户名或密码错误"}';
    }
    // if($res->num_rows == 1){
    //     echo "<script>location.href='../html/fvancl.html';</script>";
    // }else{
    //     echo "<script>alert('登陆失败');</script>";
    // }
?>